package com.amit.hibernate;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;



public class ChibernateUtil {
	
	static SessionFactory factory;

	public static SessionFactory getfactory() {
		
		AnnotationConfiguration cfg=new AnnotationConfiguration();
		cfg=(AnnotationConfiguration) cfg.configure();
		factory=cfg.buildSessionFactory();
		return factory;
	}

}
